<? if ($c = stack('name')) {

	$s = component_settings($c);
	$d = component_data($c); 
	


//debug($s);
//debug($d);


	?><div class="project">
		<table class="project-wrap" cellspacing="0">
			<tr><?
			
				foreach($d['objects'] as $v) {
			
			
					?><td class="project-slide-wrapper">
						<div class="project-slide">
							 <div class="project-slide-content"><?

//debug($v);

					switch ($v['kind']) {
						case 1:	// image
							?><img src="<?=$v['image']['fn']?>" alt="" width="<?=$v['image']['x']?>" height="<?=$v['image']['y']?>"/><?
							break;
							
						case 2: // video
						
							if (preg_match('/[?&]v=([^&]*)(&|$)/ui', $v['video'], $t)) {
								?><iframe width="543" height="368" src="http://www.youtube.com/embed/<?=$t[1]?>" frameborder="0" allowfullscreen></iframe><?
							}
						
							break;
					}

						 
							  
								  
						 ?></div>

						 <div class="project-slide-about"><?=$v['text']?></div>
						 
					</div>
				  </td><?
				  
				}
				  
				  
			
			?></tr>
		</table>
		
	</div>
	
	<div class="social">
		<a href="#" class="manage-reviews"><span class="launch-reviews"><?=tc('Отзывы')?></span><span class="close-reviews"><?=tc('Закрыть отзывы')?></span></a>
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
		<iframe src="http://www.facebook.com/plugins/like.php?app_id=260078130680868&amp;href&amp;send=false&amp;layout=button_count&amp;width=140&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:140px; height:21px;" allowTransparency="true"></iframe>
	</div>	

<? }
unstack();